<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Praca magisterska: Plik źródłowy C:/Users/boski/Documents/Visual Studio 2008/Projects/cuda/blms/filterBLMS_GPU_alpha.h</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="logo_eti_small.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Praca magisterska
   
   </div>
   <div id="projectbrief">Implementacja algorytmów filtracji adaptacyjnej o strukturze transwersalnej na platformie CUDA</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Wygenerowano przez Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Szukaj');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Strona&#160;główna</span></a></li>
      <li><a href="annotated.html"><span>Klasy</span></a></li>
      <li class="current"><a href="files.html"><span>Pliki</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Szukaj" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>Lista&#160;plików</span></a></li>
      <li><a href="globals.html"><span>Składowe&#160;plików</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('filter_b_l_m_s___g_p_u__alpha_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">C:/Users/boski/Documents/Visual Studio 2008/Projects/cuda/blms/filterBLMS_GPU_alpha.h</div>  </div>
</div>
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00012"></a>00012 <span class="preprocessor">#ifndef FILTERBLMS_GPU_alpha_H</span>
<a name="l00013"></a>00013 <span class="preprocessor"></span><span class="preprocessor">#define FILTERBLMS_GPU_alpha_H</span>
<a name="l00014"></a>00014 <span class="preprocessor"></span>
<a name="l00015"></a>00015 <span class="preprocessor">#include &quot;<a class="code" href="define_8h.html" title="Plik nagłówkowy ze zdefiniowanymi danymi.">define.h</a>&quot;</span>
<a name="l00016"></a>00016 <span class="preprocessor">#include &quot;<a class="code" href="cudacomplex_8h.html" title="Implementacja obsługi liczb zespolonych.">cudacomplex.h</a>&quot;</span>
<a name="l00017"></a>00017 <span class="preprocessor">#include &quot;<a class="code" href="signal_reader_writer_8h.html" title="Odczytywanie i zapisywanie sygnałów wejściowych i wyjściowych.">signalReaderWriter.h</a>&quot;</span>
<a name="l00018"></a>00018 <span class="preprocessor">#include &quot;fftw3.h&quot;</span>
<a name="l00019"></a>00019 <span class="preprocessor">#include &lt;cufft.h&gt;</span>
<a name="l00020"></a>00020 <span class="preprocessor">#include &quot;<a class="code" href="kernels_8h.html" title="Funkcje urządzenia (kernele) - wykonywane na GPU.">kernels.h</a>&quot;</span>
<a name="l00021"></a>00021 
<a name="l00022"></a>00022 <span class="comment">//#define CUFFT ///&lt; określa czy wykorzystywane biblioteki CUFFT (FFT na GPU), czy FFTW (FFT na CPU)</span>
<a name="l00023"></a>00023 <span class="comment">//#define DEBUG ///&lt; tryb debug (dodatkowe alokacje i &#39;printfy&#39;)</span>
<a name="l00024"></a>00024 <span class="preprocessor">#define BATCH 1 ///&lt; CUFFT</span>
<a name="l00025"></a>00025 <span class="preprocessor"></span>
<a name="l00032"></a><a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html">00032</a> <span class="keyword">struct </span><a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html">filterBLMS_GPU_alpha</a> {
<a name="l00033"></a><a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#a4d1e06d6d61fceb38c8631b96cba9c88">00033</a>         <span class="keywordtype">int</span> <a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#a4d1e06d6d61fceb38c8631b96cba9c88" title="długość filtru">M</a>; 
<a name="l00034"></a><a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#a12d633a2d211b8517574ca8a257d3842">00034</a>         <span class="keywordtype">int</span> <a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#a12d633a2d211b8517574ca8a257d3842" title="długość bloku danych">B</a>; 
<a name="l00035"></a><a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#a7ec3d43b793570aa59a3817c736cf3b4">00035</a>         <span class="keywordtype">float</span> <a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#a7ec3d43b793570aa59a3817c736cf3b4" title="parametr mi filtru">mi</a>; 
<a name="l00036"></a><a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#a20beb7ebb9bb53f87c8671942bc55616">00036</a>         <span class="keywordtype">float</span> <a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#a20beb7ebb9bb53f87c8671942bc55616" title="parametr beta filtru">beta</a>; 
<a name="l00037"></a>00037 
<a name="l00038"></a><a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#ad43122fdfbe90a7eedb6c001f6065e40">00038</a>         cudacomplex *<a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#ad43122fdfbe90a7eedb6c001f6065e40" title="sygnał wejściowy u (input)">u</a>; 
<a name="l00039"></a><a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#a2c1afcfa097cb5677d52eee0a44ecb56">00039</a>         cudacomplex *<a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#a2c1afcfa097cb5677d52eee0a44ecb56" title="sygnał wejściowy d (desired)">d</a>; 
<a name="l00040"></a><a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#afd455199c4c98a53981a5f7b0e7c64a2">00040</a>         cudacomplex *<a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#afd455199c4c98a53981a5f7b0e7c64a2" title="sygnał wyjściowy e (error)">e</a>; 
<a name="l00041"></a>00041 
<a name="l00042"></a><a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#a4040a7b521dd3beec8d58dd48d850cc5">00042</a>         cudacomplex *<a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#a4040a7b521dd3beec8d58dd48d850cc5" title="bufor zawierajacy dwa bloki sygnalu u">buf_u</a>; 
<a name="l00043"></a><a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#ad911f610b5c5c437206141df47c01273">00043</a>         cudacomplex *<a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#ad911f610b5c5c437206141df47c01273" title="blok/bufor (dlugosc 2B) sygnalu d">buf_d</a>; 
<a name="l00044"></a><a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#a4741c7b238ed640a61a9f9d5c5990f42">00044</a>         cudacomplex *<a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#a4741c7b238ed640a61a9f9d5c5990f42" title="blok/bufor (dlugosc 2B ze wzgledu na pozniejsze dzialanie ifft) sygnalu wyjsciowego y...">buf_y</a>; 
<a name="l00045"></a><a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#a3df9024517e8e3298b9257ba11c3be80">00045</a>         cudacomplex *<a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#a3df9024517e8e3298b9257ba11c3be80" title="blok/bufor (dlugosc 2B) sygnalu e">buf_e</a>; 
<a name="l00046"></a>00046 
<a name="l00047"></a><a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#a0b65dd3ddc9e361ff2f69ed5ac18a0d8">00047</a>         cudacomplex *<a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#a0b65dd3ddc9e361ff2f69ed5ac18a0d8" title="bufory &#39;podsygnalow&#39; wejsciowych po FFT (2B wektorow o dlugosci M/B w postaci jednego wektora)...">U_sub</a>; 
<a name="l00048"></a><a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#ac407d6fcbbab08b71121b6e18674df62">00048</a>         cudacomplex *<a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#ac407d6fcbbab08b71121b6e18674df62" title="wagi filtrów">lc</a>; 
<a name="l00049"></a>00049 
<a name="l00050"></a><a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#acea353de1f90e5f056027dd2cfc6253e">00050</a>         <span class="keywordtype">float</span> *<a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#acea353de1f90e5f056027dd2cfc6253e" title="parametry lambda">lambda</a>; 
<a name="l00051"></a>00051 
<a name="l00052"></a>00052         <span class="comment">// wskaźniki na zmienne w pamięci urządzenia</span>
<a name="l00053"></a><a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#ac2d1ac8e881cf4c4e015da98f8e63982">00053</a>         <span class="keywordtype">float</span> *<a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#ac2d1ac8e881cf4c4e015da98f8e63982" title="DEVICE parametry lambda.">dev_lambda</a>; 
<a name="l00054"></a><a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#a2135fe902291ea8a19ca3d60eb64eaac">00054</a>         cudacomplex *<a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#a2135fe902291ea8a19ca3d60eb64eaac" title="DEVICE bufor zawierajacy dwa bloki sygnalu u po dzialaniu FFT.">dev_U</a>; 
<a name="l00055"></a><a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#a28ae7ddee1872576923defa1e7c82b1f">00055</a>         cudacomplex *<a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#a28ae7ddee1872576923defa1e7c82b1f" title="DEVICE bufory &#39;podsygnalow&#39; wejsciowych po FFT (2B wektorow o dlugosci M/B w postaci jednego wektora)...">dev_U_sub</a>; 
<a name="l00056"></a><a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#a2534dea578b931f6eb873f0e819e0a6d">00056</a>         cudacomplex *<a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#a2534dea578b931f6eb873f0e819e0a6d" title="DEVICE probki &#39;podsygnalow&#39; wyjsciowych przed IFFT.">dev_Y</a>; 
<a name="l00057"></a><a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#aa01888ee85ec9037df737d95250dd6c4">00057</a>         cudacomplex *<a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#aa01888ee85ec9037df737d95250dd6c4" title="DEVICE bufor zawierajacy dwa bloki sygnalu e po dzialaniu FFT.">dev_E</a>; 
<a name="l00058"></a><a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#ae1ef456afec3f5c363a2b857c4dbf8e9">00058</a>         cudacomplex *<a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#ae1ef456afec3f5c363a2b857c4dbf8e9" title="DEVICE wagi filtrow.">dev_lc</a>; 
<a name="l00059"></a>00059         
<a name="l00060"></a>00060 <span class="preprocessor">#ifdef CUFFT</span>
<a name="l00061"></a>00061 <span class="preprocessor"></span><span class="preprocessor">#ifdef DEBUG</span>
<a name="l00062"></a>00062 <span class="preprocessor"></span>        cudacomplex *<a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#a63346fd806d2896ec37e23f5a65207c1" title="bufor zawierajacy dwa bloki sygnalu u po dzialaniu FFT">U</a>; 
<a name="l00063"></a>00063         cudacomplex *<a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#a5d646d882fc52851a0918aa37404e96c" title="probki &#39;podsygnalow&#39; wyjsciowych przed IFFT">Y</a>; 
<a name="l00064"></a>00064         cudacomplex *<a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#abfbb797ae4758763ec2b7c4ab2d4d87e" title="bufor zawierajacy dwa bloki sygnalu e po dzialaniu FFT">E</a>; 
<a name="l00065"></a>00065 <span class="preprocessor">#endif</span>
<a name="l00066"></a>00066 <span class="preprocessor"></span>        cudacomplex *dev_buf_u; 
<a name="l00067"></a>00067         cudacomplex *dev_buf_y; 
<a name="l00068"></a>00068         cudacomplex *dev_buf_e; 
<a name="l00069"></a>00069         
<a name="l00070"></a>00070         <span class="comment">// plany FFT (CUFFT)</span>
<a name="l00071"></a>00071         cufftHandle cufftPlan_U; 
<a name="l00072"></a>00072         cufftHandle cufftPlan_Y; 
<a name="l00073"></a>00073         cufftHandle cufftPlan_E; 
<a name="l00074"></a>00074 <span class="preprocessor">#else</span>
<a name="l00075"></a><a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#a63346fd806d2896ec37e23f5a65207c1">00075</a> <span class="preprocessor"></span>        cudacomplex *<a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#a63346fd806d2896ec37e23f5a65207c1" title="bufor zawierajacy dwa bloki sygnalu u po dzialaniu FFT">U</a>; 
<a name="l00076"></a><a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#a5d646d882fc52851a0918aa37404e96c">00076</a>         cudacomplex *<a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#a5d646d882fc52851a0918aa37404e96c" title="probki &#39;podsygnalow&#39; wyjsciowych przed IFFT">Y</a>; 
<a name="l00077"></a><a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#abfbb797ae4758763ec2b7c4ab2d4d87e">00077</a>         cudacomplex *<a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#abfbb797ae4758763ec2b7c4ab2d4d87e" title="bufor zawierajacy dwa bloki sygnalu e po dzialaniu FFT">E</a>; 
<a name="l00078"></a>00078         
<a name="l00079"></a>00079         <span class="comment">// plany FFT (FFTW)</span>
<a name="l00080"></a><a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#a4a4151656121ab3d01bb6f636d5f1288">00080</a>         fftwf_plan <a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#a4a4151656121ab3d01bb6f636d5f1288" title="plan FFT">fftwfPlan_U</a>; 
<a name="l00081"></a><a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#abfdcfc74ca4e887e6d0ca2f96ac59df2">00081</a>         fftwf_plan <a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#abfdcfc74ca4e887e6d0ca2f96ac59df2" title="plan IFFT">fftwfPlan_Y</a>; 
<a name="l00082"></a><a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#a426b9f955edb9313dd8d7b1334cef251">00082</a>         fftwf_plan <a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#a426b9f955edb9313dd8d7b1334cef251" title="plan FFT">fftwfPlan_E</a>; 
<a name="l00083"></a>00083 <span class="preprocessor">#endif</span>
<a name="l00084"></a>00084 <span class="preprocessor"></span>
<a name="l00096"></a>00096         <a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#afa6ee747f01eabeb3f503c9609a84e51">filterBLMS_GPU_alpha</a>(<span class="keywordtype">int</span> Nu, <span class="keywordtype">int</span> Msize, <span class="keywordtype">int</span> Bsize, <span class="keywordtype">float</span> miParam, <span class="keywordtype">float</span> betaParam, <a class="code" href="struct_signal_reader_writer.html" title="Odczytywanie i zapisywanie sygnałów wejściowych i wyjściowych.">SignalReaderWriter</a> SRW);
<a name="l00097"></a>00097 
<a name="l00101"></a>00101         <a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#a0e3991ade1e3d3f1b95475f83ca15d8e">~filterBLMS_GPU_alpha</a>();
<a name="l00102"></a>00102 
<a name="l00111"></a>00111         <span class="keywordtype">void</span> <a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#a447b558f9afd353c9021a480c4091e64">dataFiltering</a>(<span class="keywordtype">int</span> blocksPerGrid, <span class="keywordtype">int</span> threadsPerBlock, <span class="keywordtype">int</span> Nu);
<a name="l00112"></a>00112 
<a name="l00118"></a>00118         <span class="keywordtype">void</span> <a class="code" href="structfilter_b_l_m_s___g_p_u__alpha.html#a44acb174870eccc05ce69fbae0843d5d">freeMemory</a>();
<a name="l00119"></a>00119 
<a name="l00120"></a>00120 };
<a name="l00121"></a>00121 
<a name="l00122"></a>00122 <span class="preprocessor">#endif </span><span class="comment">/* FILTERBLMSGPU_alpha_H */</span>
</pre></div></div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>filterBLMS_GPU_alpha.h</b>      </li>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Klasy</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Pliki</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Funkcje</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Zmienne</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Definicje</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>


    <li class="footer">Wygenerowano Wed Nov 23 2011 12:30:13 dla Praca magisterska programem
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
